class CreateProperties < ActiveRecord::Migration
  def self.up
    create_table :properties do |t|
      t.column :game_id,           :integer, :limit => 8
      t.column :engine_option_id,  :integer, :limit => 2           #游戏引擎id
      t.column :type_option_id,    :integer, :limit => 2           #游戏类型id
      t.column :state_option_id,   :integer, :limit => 2           #当前状态id
      t.column :company_option_id, :integer, :limit => 2           #运营公司id
      t.column :pinyin ,           :string,  :limit => 1           #拼音排序字幕
      t.column :home_url,          :string,  :limit => 255         #官方网址
      t.column :signup_url,        :string,  :limit => 255         #注册网址
      t.column :download_url,      :string,  :limit => 255         #下载网址
      t.column :strategy_url ,     :string,  :limit => 255         #攻略网址
      t.column :vote,              :integer, :limit => 8           #投票次数
      t.column :vote_quantity,     :integer, :limit => 8           #投票数量
      t.column :star,              :integer, :limit => 1           #星级数(投票次数与数量换算)
    end
  end

  def self.down
    drop_table :properties
  end
end
